#include <iostream>
#include <algorithm>
#include <vector>

using namespace std; 

#define INF 0x7f7f7f7f

struct point_s {
	int x, y; 
}; 

vector <point_s> ap, hp, vp; 
int n, k; 

struct rect_s {
	int x0, y0, x1, y1; 
	int min_x, max_x, min_y, max_y; 
	int size; 
	rect_s() {
		min_x = min_y = INF; 
		max_x = max_y = 0; 
		size = INF; 
	}
	void set_frame(int _x0, int _y0, int _x1, int _y1) {
		x0 = _x0; 
		y0 = _y0; 
		x1 = _x1; 
		y1 = _y1; 
		size = INF; 
	}
	int get_size(void) {
		int chs = 0; 
		if (size!=INF) {
			return size; 
		}
		for (unsigned i=0; i<ap.size(); i++) {
			point_s &p = ap[i]; 
			if (p.x<=x0 || p.x>x1 || p.y<=y0 || p.y>y1) {
				continue; 
			}
			chs ++; 
			max_x = max(max_x, p.x); 
			max_y = max(max_y, p.y); 
			min_x = min(min_x, p.x); 
			min_y = min(min_y, p.y); 
		}
		size = (max_x - min_x) * (max_y - min_y); 
		size = chs>0 ? size : 0; 
		return size; 
	}
};

bool cmp_h(point_s &a, point_s &b)
{
	return a.x<b.x; 
}

bool cmp_v(point_s &a, point_s &b)
{
	return a.y<b.y; 
}

int split(rect_s &r, int nr_parts)
{
	int size, b_size, a_size, min_size = INF; 

	if (nr_parts==1) {
		return r.get_size();
	}

	for (int np=1; np<nr_parts; np++) {
		for (int i=0; i<n; i++) {
			point_s &p = hp[i]; 
			rect_s a, b; 
			if (p.x<=r.x0 || p.x>r.x1) {
				continue; 
			}
			a.set_frame(r.x0, r.y0, p.x, r.y1); 
			a_size = split(a, np); 
			b.set_frame(p.x, r.y0, r.x1, r.y1); 
			b_size = split(b, nr_parts-np); 
			size = a_size + b_size; 
			min_size = min(min_size, size); 
		}
		for (int i=0; i<n; i++) {
			point_s &p = vp[i]; 
			rect_s a, b; 
			if (p.y<=r.y0 || p.y>r.y1) {
				continue; 
			}
			a.set_frame(r.x0, r.y0, r.x1, p.y); 
			a_size = split(a, np); 
			b.set_frame(r.x0, p.y, r.x1, r.y1); 
			b_size = split(b, nr_parts-np); 
			size = a_size + b_size; 
			min_size = min(min_size, size); 
		}
	}
	return min_size; 
}

int main()
{
	rect_s rr, a, b, aa, ab, ba, bb;  
	int res; 
	
	cin>>n>>k; 
	for (int i=0; i<n; i++) {
		point_s p; 
		cin>>p.x>>p.y; 
		ap.push_back(p); 
		hp.push_back(p); 
		vp.push_back(p); 
	}
	sort(hp.begin(), hp.end(), cmp_h); 
	sort(vp.begin(), vp.end(), cmp_v); 

	rr.set_frame(-1, -1, 501, 501); 
	res = split(rr, k); 
	cout<<res<<"\n"; 
	return 0; 
}



